<template>
  <!-----------------------------------------------表单分类表格----------------------------------------->
  <div>
    <div class="firstPage">
      <div class="firstPage-header">
        <button @click="goBack" class="gobackbtn">
          <i class="iconfont icon-arrow-left"></i>
        </button>
        <el-input
          clearable
          placeholder="搜索栏"
          prefix-icon="el-icon-search"
          v-model="input1">
        </el-input>
        <span class="Total-people">合计人</span>
        <button class="sort-btn">123</button>
      </div>
      <div class="firstPage-content">
        <el-table
          :data="tableData"
          border
          style="width: 100%"
          @cell-click="totypeform">
          <el-table-column
            prop="date"
            label="日期"
            width="280">
          </el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            width="240">
          </el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            width="260">
          </el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            width="280">
          </el-table-column>
          <el-table-column
            prop="name"
            label="姓名"
            width="260">
          </el-table-column>
          <el-table-column
            prop="address"
            label="地址">
          </el-table-column>
        </el-table>
      </div>
    </div>
  </div>
</template>

<script>
  import store from '@/store'
  export default {
    name: 'formsortlist',
    data () {
      return {
        input1: '',
        tableData: [{
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄'
        }, {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1517 弄'
        }, {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1519 弄'
        }, {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1516 弄'
        }]
      }
    },
    methods: {
      goBack () {
        store.commit('updateToggleValue', 'index')
      },
      totypeform () {
        store.commit('updateToggleValue', 'formtypelist')
      }
    }
  }
</script>

<style  lang="stylus" rel="stylesheet/stylus" scoped>
  .firstPage
    width 98%
    height 50px
    margin 20px 0 0 1%
  .firstPage-header{
    width 100%
    height 50px
  }
    .sort-btn{
      float right
      color #B4BCCC
      margin-right 20px
      background-color white
      border 1px solid #D8DCE5
      border-radius 4px
      padding 5px
    }
  .gobackbtn{
    width 40px
    height 40px
    border 1px solid  #D8DCE5
    background-color #ffffff
    color #878D99
  }
  .el-input{
    width 200px
    margin-left 20px
  }
  .firstPage-content{
    width 100%
    margin-top 20px
    background-color #016DFB
  }
</style>
